//
//  CZUser.swift
//  XLWB009
//
//  Created by apple on 3/28/16.
//  Copyright © 2016 apple. All rights reserved.
//

import UIKit

class CZUser: NSObject {

    //用户id
    var id:Int64 = 0
    
    //用户头像
    var profile_image_url:String?
    
    //用户名称
    var screen_name:String?
    
    //用户会员等级
    var mbrank:Int = 0
    
    //用户认证
    var verified_type : Int = -1
    
    //字典转模型
    init(dict:[String: AnyObject]) {
        
        //创建对象
        super.init()
        
        //创建对象完成，调用对象的KVC
        setValuesForKeysWithDictionary(dict)
        
    }
    
    //字典中的key在模型中找不到属性
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {}
    
    //打印对象的方法
    override var description : String{
        let key=["id","profile_image_url","screen_name","mbrank","verified_type"]
        
        return "\n\t:\(dictionaryWithValuesForKeys(key).description)"
    }
    
}
